package com.mycompany.delivery.servicelayer;


import com.mycompany.delivery.dto.ContactDTO;
import com.mycompany.delivery.dto.DeliveryDTO;
import java.util.List;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Jana Nemcova
 */
public interface ContactService {
    /**
     * Creates contact 
     * @param contactDTO
     */
    public ContactDTO create(ContactDTO p);

        /**
     * Updates contact 
     * @param contactDTO
     */
    public ContactDTO update(ContactDTO p);

     /**
     * Removes contact 
     * @param contactDTO
     */
    public ContactDTO remove(ContactDTO p);
    
    /**
     * Finds contact by given ID
     * @param idDTO
     */
    public ContactDTO find(Long id);

     /**
     * Finds contact by surname
     * @param surname
     */
    public List<ContactDTO> findContactBySurname(String name);
    
     /**
     * Finds deliveries by sender
     * @param List<deliveryDTO>
     */
    public List<DeliveryDTO> findDeliveriesBySender(ContactDTO contact);

    /**
     * Finds deliveries by recevier
     * @param List<deliveryDTO>
     */
    public List<DeliveryDTO> findDeliveriesByReceiver(ContactDTO contact);
    
    /**
     * Gets a list of all contacts
     * @return 
     */
    public List<ContactDTO> getAllContacts();
    
   
}
